<div class="inner">
    <h1>Dashboard</h1>
    <hr/>
</div>
<div class="inner">
    <h3>Entities</h3>
    <div style="border: 1px solid gray; padding: 5px;">
        <?php foreach ($modelsInfo as $modelInfo): ?>
            <a style="margin-right: 10px; font-weight: bold;  color: #222222; font-size: 110%;" href="<?= $modelInfo['url'] ?>" ><?= ucfirst($modelInfo['name']) ?></a>
        <?php endforeach; ?>
    </div>
    <h3>General</h3>
    <div style="border: 1px solid gray; padding: 5px;">
        <table class="info-table">
            <tr><td><span class="desc">Server time:</span></td><td><?php echo date("H:i:s") ?></td></tr>
            <tr><td><span class="desc">PHP version:</span></td><td><?php echo phpversion() ?></td></tr>
            <tr><td><span class="desc">Application name:</span></td><td><?php echo Yii::app()->name ?></td></tr>
            <tr><td><span class="desc">Modules used:</span></td><td><?php echo implode(' | ', array_keys(Yii::app()->modules)) ?></td></tr>
            <tr><td><span class="desc">Components used:</span></td><td><?php echo implode(' | ', array_keys(Yii::app()->components)) ?></td></tr>
        </table>
    </div>
    <h3>Schema</h3>
    <div style="border: 1px solid gray; padding: 5px;">
        <table class="info-table">
            <tr><td><span class="desc">Connection status:</span></td><td><?= Yii::app()->db->connectionStatus ?></td></tr>
            <tr><td><span class="desc">Client version:</span></td><td><?= Yii::app()->db->clientVersion ?></td></tr>
            <tr><td><span class="desc">Default charset:</span></td><td><?= Yii::app()->db->charset ?></td></tr>
            <tr><td><span class="desc">Query stats:</span></td><td><?= Yii::app()->db->serverInfo ?></td></tr>
            <tr><td><span class="desc">Schema caching duration:</span></td><td><?= (Yii::app()->db->schemaCachingDuration == 0) ? 'Caching Off' : Yii::app()->db->schemaCachingDuration ?></td></tr>
        </table>
    </div>
</div>
<?php

$conf = new CConfiguration(Yii::getPathOfAlias('application.config') . DIRECTORY_SEPARATOR . 'main.php');
fb::log($conf);
$params = $conf->itemAt('params');
fb::log($params);
$params['adminEmail'] = 'newEmail@email.com';
$conf->add('params', $params);
fb::log($conf);
fb::log($conf->saveAsString());
fwrite(fopen(Yii::getPathOfAlias('application.config') . DIRECTORY_SEPARATOR . 'test1.php', "w"), "<?php \n return " . $conf->saveAsString());
?>
<style>
    .info-table td {
        padding: 3px 5px;
    }
    .info-table span.desc {
        font-weight: bold;
    }
</style>